<% provide(:title, @user.name) %>

<div class="row">

  <div class="col-md-6 col-sx-8">
    <div id="calendar"></div>
  </div>
  <br>



  <div class="col-md-6">
    <table class="table table-bordered table-hover">
      <thead>
        <tr>
          <th>工作令号</th>
          <th>大类</th>
          <th>分类</th>
          <th>任务</th>
          <th>工时</th>
          <th>日期</th>
          <th colspan="2">操作</th>
        </tr>
      </thead>

      <tbody id='mytasks'>
        <% @microposts.each do |micropost| %>
        <tr>
          <td>
            <%= micropost.jobnumber.name %>
          </td>
          <td>
            <%= micropost.category.name %>
          </td>
          <td>
            <%= micropost.subcategory.name %>
          </td>
          <td>
            <%= micropost.task %>
          </td>
          <td>
            <%= micropost.cost %>
          </td>
          <td>
            <%= micropost.date %>
          </td>
          <td>
            <%= link_to '修改', edit_micropost_path(micropost) %>
          </td>
          <td>
            <%= link_to '删除', micropost, method: :delete, data: { confirm: 'Are you sure?' } %>
          </td>
        </tr>
        <% end %>
      </tbody>
    </table>
  </div>
</div>